import { dateNotCheck, foreverNotCheck } from './api'
import { ElMessage } from 'element-plus'
import { dialog } from '@/utils/dialog'
import NotTable from './component/NotTable.vue'

export function onNotToday(ctx) {
  const row = ctx.props.row
  dateNotCheck({
    "subAccountId": row.subAccountId,
    "date": row.date
  }).then(() => {
    ElMessage.success('操作成功')
    ctx._c.dispatch('ListPage', 'getData')
  })
}

export function onNotAlways(ctx) {
  const row = ctx.props.row
  foreverNotCheck({
    "subAccountId": row.subAccountId
  }).then(() => {
    ElMessage.success('操作成功')
    ctx._c.dispatch('ListPage', 'getData')
  })
}

export function showNotDetected() {
  dialog(NotTable, { title: '不检测列表', modalClass: 'custom-dialog' }, {})
}